package com.itheima.dao;


import com.itheima.domain.Account;
import org.apache.ibatis.annotations.One;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface IAccountDao {

    @Select("select * from account")
    @Results(id = "accountMap",
            value ={
            @Result(id = true,property = "id",column = "id"),
            @Result(property = "uid",column = "uid"),
            @Result(property = "money",column = "money"),
                    @Result(property = "user",column = "uid",one = @One(
                            select = ""
                    ))
            } )
    List<Account> findAll();
}
